﻿/*
 * ConsoleLog.h
 */
#ifndef __GDK__CONSOLELOG__
#define __GDK__CONSOLELOG__


#include <gdk/core/Types.h>
#include <gdk/core/Log.h>
#include <gdk/core/String.h>


#if !defined(_MSC_VER)
#	define GDK_CONSOLELOG_DLL_BUILD
#endif


#ifdef GDK_CONSOLELOG_DLL_BUILD
#	define GDK_CONSOLELOG_EXPORT	__DECLSPEC__(__DLLEXPORT__)
#elif !defined(GDK_CONSOLELOG_LIB_BUILD)
#	define GDK_CONSOLELOG_EXPORT	__DECLSPEC__(__DLLIMPORT__)
#else
#	define GDK_CONSOLELOG_EXPORT
#endif


#define GDK_CONSOLELOG_VERSION_MAJOR	1
#define GDK_CONSOLELOG_VERSION_MINOR	0
#define GDK_CONSOLELOG_VERSION_MICRO	0
#define GDK_CONSOLELOG_VERSION_INT		GDK_VERSION_INT(GDK_CONSOLELOG_VERSION_MAJOR,\
														GDK_CONSOLELOG_VERSION_MINOR,\
														GDK_CONSOLELOG_VERSION_MICRO)
#define GDK_CONSOLELOG_VERSION			GDK_VERSION(GDK_CONSOLELOG_VERSION_MAJOR,\
													GDK_CONSOLELOG_VERSION_MINOR,\
													GDK_CONSOLELOG_VERSION_MICRO)



namespace gdk
{


	class ConsoleLog : public LogListener
	{
	public:
		virtual const Char* getname(void) const;
		virtual void setparam(const Char *param);
		virtual void message(pid_t tid, class Time const &time, const Char *msg);
		virtual void warning(pid_t tid, class Time const &time, const Char *msg);
		virtual void error(pid_t tid, class Time const &time, const Char *msg);
		virtual void debug(pid_t tid, class Time const &time, const Char *msg);
	};

	DECLARE_LOG_LISTENER(ConsoleLog)


}//namespace gdk



#endif //__GDK__CONSOLELOG__
